<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/public/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/public/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/public/h-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/public/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/public/h-ui.admin/css/style.css" />
<link rel="stylesheet" type="text/css" href="/public/h-ui.admin/css/H-ui.login.css" />
<link rel="stylesheet" type="text/css" href="/public/h-ui.admin/css/common.css" />
<link rel="stylesheet" type="text/css" href="/public/h-ui.admin/lib/webuploader/0.1.5/webuploader.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>后台管理系统</title>
<meta name="keywords" content="后台管理系统">
<meta name="description" content="后台管理系统">
</head>
<script type="text/javascript">
// 修改指定表的指定字段值 包括有按钮点击切换是否 或者 排序 或者输入框文字
function changeTableVal(table, id_name, id_value, field, obj,yes,no) {
	var value = $(obj).val();
    if(yes == '' || typeof(yes)== 'undefined')yes='是';
    if(no == '' || typeof(no) == 'undefined')no='否';
	if ($(obj).hasClass('no')) // 图片点击是否操作
	{
		//src = '/public/images/yes.png';
		$(obj).removeClass('no').addClass('yes');
		$(obj).html("<i class='fa fa-check-circle'></i>"+yes+"");
		value = 1;
	} else if ($(obj).hasClass('yes')) { // 图片点击是否操作
		$(obj).removeClass('yes').addClass('no');
		$(obj).html("<i class='fa fa-ban'></i>"+no+"");
		value = 0;
	}

	$.ajax({
		url: "/Admin/index/changeTableVal?table=" + table + "&id_name=" + id_name + "&id_value=" + id_value + "&field=" + field + '&value=' + value,
		success: function (data) {
			if (!$(obj).hasClass('no') && !$(obj).hasClass('yes'))
				layer.msg('更新成功', {icon: 1});
		}
	});
}

/*
 * 上传图片 后台专用
 * @access  public
 * @null int 一次上传图片张图
 * @elementid string 上传成功后返回路径插入指定ID元素内
 * @path  string 指定上传保存文件夹,默认存在public/upload/temp/目录
 * @callback string  回调函数(单张图片返回保存路径字符串，多张则为路径数组 )
 */
function GetUploadify(num,elementid,path,callback,fileType)
{	   	
	var upurl ='/Admin/Uploadify/upload?num='+num+'&input='+elementid+'&path='+path+'&func='+callback+'&fileType='+fileType;
    var title = '上传图片';
    if(fileType == 'Flash'){
        title = '上传视频';
    }
    layer.open({
        type: 2,
        title: title,
        shadeClose: true,
        shade: false,
        maxmin: true, //开启最大化最小化按钮
        area: ['50%', '60%'],
        content: upurl
     });
}
</script>